package com.trana.demo;

public class demo5 {
	public static void main(String[] args) {
		Foo4 foo4=new Foo4();
		System.out.println(foo4.num1);
		System.out.println(foo4.num2);
		System.out.println(foo4.num3);
		System.out.println(foo4.num4);
	}

}


class Foo1{
	int num1=100;
	
}
class Foo2 extends Foo1{
	int num2=200;
}
class Foo3 extends Foo2{
	int num3=300;
}
class Foo4 extends Foo3{
	int num4=400;
}